print("请按以下数字选择你需要的运算：")
print("1、加法")
print("2、减法")
print("3、乘法")
print("4、除法")
print("5、整除")
print("6、取余")
print("7、开方")


def add(a, b):
    return a + b

def sub(a, b):
    return a - b

def mul(a, b):
    return a * b

def div(a, b):
    return a / b

def ediv(a, b):
    return a // b

def rem(a, b):
    return a % b

def sqrt(a):
    return float(a ** (1/2))


C = input("请输入你需要的运算方法（1-7）：")
if C == '7':
    a = int(input("请输入一个你想开方的数字："))
else:
    a = int(input("请输入第一个数字："))
    b = int(input("请输入第二个数字："))



if C == '1':
    print(a, "+", b, "=", add(a, b))

elif C == '2':
    print(a, "-", b, "=", sub(a, b))

elif C == '3':
    print(a, "*", b, "=", mul(a, b))

elif C == '4':
    print(a, "/", b, "=", div(a, b))
elif C == '5':
    print(a, "//", b, "=", ediv(a, b))
elif C == '6':
    print(a, "%", b, "=", rem(a, b))
elif C == '7':
    print(a, "^(1/2)", "=", sqrt(a))
else:
    print("请在指定范围内进行选择！")